#include <type_traits>
#include <iostream>

int func() { return 42; }

int main() {
    using ArrayType = int[10];
    using FunctionType = decltype(func);
    
    // 应用 std::decay
    using DecayedArrayType = std::decay<ArrayType>::type;  // 数组到指针的转换
    using DecayedFunctionType = std::decay<FunctionType>::type;  // 函数到指针的转换

    std::cout << std::boolalpha;
    std::cout << "Decayed ArrayType is int*: " << std::is_same<int*, DecayedArrayType>::value << std::endl;
    std::cout << "Decayed FunctionType is int(*)(): " << std::is_same<int(*)(), DecayedFunctionType>::value << std::endl;
}